import Vue from 'vue'
import App from './App'
import store from './store'
import {bluetooth,write} from '@/utils/bluetooth-wx.js'

Vue.prototype.bluetooth=bluetooth
Vue.prototype.write=write
Vue.prototype.$store = store
Vue.config.productionTip = false

var amapFile = require('@/utils/amap-wx.130.js');
Vue.prototype.myAmapFun = new amapFile.AMapWX({
	key: '61c941f03788203df6cb3fce9136a03f'
});
App.mpType = 'app'
console.log('main')
const token = uni.getStorageSync('token');// 从缓存中获取token
if (token && !store.getters.userInfo.nickName) {
	store.dispatch('user/getUserInfo')
}
const app = new Vue({
    ...App,
	store
})
app.$mount()
